﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BiliBiliCSharpStudy.old {
    class DemoForMultiplicationTable {
        public static void demo() {
            //test1();
            test2();
        }

        // 打印三角形
        public static void test2() {
            for (int a = 1; a <= 9; a++) {
                for (int b = 1; b <= a; b++) {
                    Console.Write("*");
                }
                Console.WriteLine();
            }
        }


        // 乘法表
        public static void test1() {
            for (int a = 1; a <= 9; a++) {
                for (int b = 1; b <= a; b++) {
                    Console.Write("{0}x{1}={2}\t", a, b, a * b);
                }
                Console.WriteLine();
            }
        }
    }
}
